-- GENERATED SPELL FOR [Brokespear] --


function spell0_5838(pUnit, Event) --@Slowing Poison,n/a--
pUnit:FullCastSpellOnTarget(7992,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5838', 26000, 1)
end

function spell1_5838(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(10277,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5838', 500, 1)
end

function Sorts_5838(pUnit, Event)
local choix_sorts_5838 = math.random(0, 1)
if choix_sorts_5838 == 0 then
pUnit:RegisterEvent('spell0_5838', 1, 1)
end
if choix_sorts_5838 == 1 then
pUnit:RegisterEvent('spell1_5838', 1, 1)
end
end

function mob5838_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5838', math.random(1500, 3000), 1)
end

function mob5838_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5838_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5838_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5838, 1, 'mob5838_Action')
RegisterUnitEvent(5838, 2, 'mob5838_Leave')
RegisterUnitEvent(5838, 3, 'mob5838_Kill')
RegisterUnitEvent(5838, 4, 'mob5838_Die')
